//
//  User.swift
//  NewLndd
//
//  Created by 邵禹曦 on 2020/1/2.
//  Copyright © 2020 辽宁当代. All rights reserved.
//

import UIKit

class User: NSObject,NSCoding {
    
    
    
    var U : String?
    var RETCODE : String?
    
    // MARK: - 自定义构造函数
    init(dict : [String : AnyObject]) {
        super.init()
        setValuesForKeys(dict)
           
    }
    // 重写
    override func setValue(_ value: Any?, forUndefinedKey key: String) {}
    
    
    // 解档
    required init?(coder: NSCoder) {
        U = coder.decodeObject(forKey: "U") as? String
        RETCODE = coder.decodeObject(forKey: "RETCODE") as? String
    }
    
    // 归档
    func encode(with coder: NSCoder) {
        coder.encode(U, forKey: "U")
        coder.encode(RETCODE, forKey: "RETCODE")
    }
}
